package van.planifolia.demo01;

/**
 * Created by Intellij IDEA<br>
 * 使用泛型实现坐标
 * @author Planifolia.Van
 * @version 1.0
 * @date 2022/10/25 16:13
 */
public class Point<T> {
    private T xPoint;
    private T yPoint;

    public Point(T xPoint, T yPoint) {
        this.xPoint = xPoint;
        this.yPoint = yPoint;
    }

    public Point() {
    }

    public T getxPoint() {
        return xPoint;
    }

    public void setxPoint(T xPoint) {
        this.xPoint = xPoint;
    }

    public T getyPoint() {
        return yPoint;
    }

    public void setyPoint(T yPoint) {
        this.yPoint = yPoint;
    }

    @Override
    public String toString() {
        return "Point{" +
                "xPoint=" + xPoint +
                ", yPoint=" + yPoint +
                '}';
    }
}
